/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.basic.park.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hopes.bizz.basic.common.constant.enums.ParkBasicSysDictEnum;
import com.hopes.boss.admin.api.resolver.DictResolver;
import com.hopes.boss.admin.api.resolver.enums.AdminDictEnum;
import com.hopes.boss.admin.api.resolver.enums.SysDictEnum;
import com.hopes.boss.common.entity.BaseLogicEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * 园区安全基本信息
 *
 * @author pig
 * @date 2023-10-26 09:22:25
 */
@Data
@TableName("base_park_safe_basic")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "园区安全基本信息")
public class BaseParkSafeBasicEntity extends BaseLogicEntity {

    private static final long serialVersionUID = 1L;


    /**
     * 标识
     */
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "标识")
    private Long id;

    /**
     * 截止日期
     */
    @Schema(description = "截止日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date ineffectiveDate;

    /**
     * 安全风险等级
     */
    @Schema(description = "安全风险等级")
    private String safeRiskLevel;

    /**
     * 危险废物安全处置率
     */
    @Schema(description = "危险废物安全处置率")
    private Double safWasteDisposalRate;

    /**
     * 高空瞭望设备数
     */
    @Schema(description = "高空瞭望设备数")
    private Integer highCameraNum;

    /**
     * 防洪(潮)设施达到标准
     */
    @Schema(description = "防洪(潮)设施达到标准")
    private String floodControlStandard;

    /**
     * 是否建有应急指挥中心
     */
    @Schema(description = "是否建有应急指挥中心")
    private Boolean existCommandCenter;

    /**
     * 是否具备应急通信设施
     */
    @Schema(description = "是否具备应急通信设施")
    private Boolean existCommFacility;

    /**
     * 对关键生产区域实行全封闭化管理
     */
    @Schema(description = "对关键生产区域实行全封闭化管理")
    private Boolean existKeyAreaClosedManage;

    /**
     * 对重大危险源实行全封闭化管理
     */
    @Schema(description = "对重大危险源实行全封闭化管理")
    private Boolean existGreatDangerClosedManage;

    /**
     * 园区内是否有村庄
     */
    @Schema(description = "园区内是否有村庄")
    private Boolean existInnerVillage;

    /**
     * 园区内是否有学校
     */
    @Schema(description = "园区内是否有学校")
    private Boolean existInnerSchool;

    /**
     * 园区内是否有劳动力密集型非化工生产企业
     */
    @Schema(description = "园区内是否有劳动力密集型非化工生产企业")
    private Boolean existLaborIntensiveNonChemicalCompany;

    /**
     * 备注
     */
    @Schema(description = "备注")
    private String remark;

    /**
     * 附件
     */
    @Schema(description = "附件")
    private String attachment;

    /**
     * 机构ID
     */
    @Schema(description = "机构ID")
    private Long orgId;

    public String getOrgIdStr() {
        return DictResolver.getItemLabelByValue(AdminDictEnum.sys_company,this.orgId);
    }

    public String getSafeRiskLevelStr() {

        return DictResolver.getItemLabelByValue(ParkBasicSysDictEnum.safe_risk_level, this.safeRiskLevel);
    }

    public String getExistCommandCenterStr() {

        return DictResolver.getItemLabelByValue(SysDictEnum.yes_no_type, this.existCommandCenter);
    }

    public String getExistCommFacilityStr() {

        return DictResolver.getItemLabelByValue(SysDictEnum.yes_no_type, this.existCommFacility);
    }

    public String getExistInnerSchoolStr() {

        return DictResolver.getItemLabelByValue(SysDictEnum.yes_no_type, this.existInnerSchool);
    }

    public String getExistInnerVillageStr() {

        return DictResolver.getItemLabelByValue(SysDictEnum.yes_no_type, this.existInnerVillage);
    }
    public String getExistGreatDangerClosedManageStr() {

        return DictResolver.getItemLabelByValue(SysDictEnum.yes_no_type, this.existGreatDangerClosedManage);
    }
    public String getExistKeyAreaClosedManageStr() {

        return DictResolver.getItemLabelByValue(SysDictEnum.yes_no_type, this.existKeyAreaClosedManage);
    }
    public String getExistLaborIntensiveNonChemicalCompanyStr() {

        return DictResolver.getItemLabelByValue(SysDictEnum.yes_no_type, this.existLaborIntensiveNonChemicalCompany);
    }


}
